/**
 * create by young (young2f@outlook.com) on 2023/5/4
 */
'use strict';
const _ = require('lodash');
const fs = require('fs');
// const moment = require('moment');
// const start = moment().add(-1, 'day').utc().startOf('days');
// const str=moment(start).format('YYYY-MM-DD')+' 23:59:59'
// const end=moment(str).valueOf()
// console.log(str,moment(end).format('YYYY-MM-DD HH:mm:ss'));
const point = {
    'dt': '02',
    'identifier': 'FT111CPLL',
    'path': 'FT111CPLL',
    'name': 'FT111产品总量',
    'address': '1',
    'isDesensitization': false,
    'offset': '0',
    'len': '4',
    'uploadCycle': '3',
    'divide': '1',
    'type': 'uni16',
    'cycle': '3000'
};
const str=fs.readFileSync('./njk.txt','utf8')
const names = str.split('\r\n');
const pos = [];
names.forEach(name => {
    const _point = _.clone(point);
    _point.name = name;
    pos.push(_point);
});

// fs.writeFileSync('./pointNjk.json',JSON.stringify(pos))
